
* This do-file runs all the vote regressions at the regional level for the US

use DB_For_Vote_Regressions_Regional_US_CZ.dta, clear


************************
* Table 1, columns 1-2 * 
************************

reg environmentalism trade_exposure_tot cz##c.year, cluster(cz)

ivreg2 environmentalism (trade_exposure_tot = iv_trade_exposure_tot) cz##c.year, cluster(cz) first


*************
* Table A4  *
*************	

ivreg2 environmentalism (trade_exposure_hi = iv_trade_exposure_hi) cz##c.year, cluster(cz) first

ivreg2 environmentalism (trade_exposure_li = iv_trade_exposure_li) cz##c.year, cluster(cz) first

ivreg2 environmentalism (trade_exposure_china = iv_trade_exposure_china) cz##c.year, cluster(cz) first


*************
* Table A5  *
*************	

ivreg2 environmentalism (trade_exposure_tot = iv_trade_exposure_tot) cz##c.year if year~=2008, cluster(cz) first


*************
* Table A6  *
*************	

ivreg2 environmentalism (trade_exposure_tot = iv_trade_exposure_tot) export_exposure cz##c.year, cluster(cz) first


*************
* Table A7  *
*************	

ivreg2 DWnominate (trade_exposure_tot = iv_trade_exposure_tot) cz##c.year, cluster(cz) first

ivreg2 environmentalism (trade_exposure_tot = iv_trade_exposure_tot) DWnominate cz##c.year, cluster(cz) first


*************
* Table A8  *
*************	

ivreg2 environmentalism gdp_growth_rate unemployment_rate (trade_exposure_tot = iv_trade_exposure_tot) cz##c.year, cluster(cz) first


*************
* Table A9  *
*************	
ivreg2 environmentalism temperature_anomaly (trade_exposure_tot = iv_trade_exposure_tot) cz##c.year, cluster(cz)

ivreg2 environmentalism temperature_anomaly_pos temperature_anomaly_neg (trade_exposure_tot = iv_trade_exposure_tot) cz##c.year, cluster(cz)

ivreg2 environmentalism heat_episode (trade_exposure_tot = iv_trade_exposure_tot) cz##c.year, cluster(cz)

ivreg2 environmentalism dry_spell (trade_exposure_tot = iv_trade_exposure_tot) cz##c.year, cluster(cz)


*************
* Table A10 *
*************	

ivreg2 environmentalism export_exposure DWnominate gdp_growth_rate unemployment_rate temperature_anomaly heat_episode dry_spell (trade_exposure_tot = iv_trade_exposure_tot) cz##c.year, cluster(cz)


*************
* Table A11	*
*************	 

* Column 1
local A11_1 "trend_in_environmentalism trend_in_sh_manufacturing trend_in_sh_services trend_in_sh_primary trend_in_low_skill trend_in_med_skill trend_in_high_skill"
foreach x of local A11_1 {
	ivreg2 environmentalism `x' (trade_exposure_tot = iv_trade_exposure_tot) i.cz, cluster(cz)
}

* Column 2
local A11_2 "trend_inchange_environmentalism trend_inchange_sh_manufacturing trend_inchange_sh_services trend_inchange_sh_primary trend_inchange_low_skill trend_inchange_med_skill trend_inchange_high_skill"
foreach x of local A11_2 {
	ivreg2 environmentalism `x' (trade_exposure_tot = iv_trade_exposure_tot) i.cz, cluster(cz)
}

* Column 3
local A11_3 "in_environmentalism_YE in_sh_manufacturing_YE in_sh_services_YE in_sh_primary_YE in_low_skill_YE in_med_skill_YE in_high_skill_YE"
foreach x of local A11_3 {
	ivreg2 environmentalism `x'* (trade_exposure_tot = iv_trade_exposure_tot) cz##c.year, cluster(cz)
}

* Column 4
local A11_4 "inchange_environmentalism_YE inchange_sh_manufacturing_YE inchange_sh_services_YE inchange_sh_primary_YE inchange_low_skill_YE inchange_med_skill_YE inchange_high_skill_YE"
foreach x of local A11_4 {
	ivreg2 environmentalism `x'* (trade_exposure_tot = iv_trade_exposure_tot) cz##c.year, cluster(cz)
}


*************
* Table A12	*
*************	 

collapse (mean) inchange_environmentalism inchange_sh_manufacturing inchange_sh_services inchange_sh_primary inchange_low_skill inchange_med_skill inchange_high_skill REP_share log_pop empl_manuf_share empl_pop_ratio trade_exposure_tot iv_trade_exposure_tot division, by (cz)
replace division=round(division,1)

* Column 1
local A12 "inchange_environmentalism inchange_sh_manufacturing inchange_sh_services inchange_sh_primary inchange_low_skill inchange_med_skill inchange_high_skill REP_share empl_manuf_share log_pop empl_pop_ratio"

foreach var of local A12 {
	ivreg2 `var' (trade_exposure_tot = iv_trade_exposure_tot) i.division, cluster(division)
}

* Column 2
foreach var of local A12 {
	ivreg2 `var' iv_trade_exposure_tot i.division, cluster(division)
}


*************
* Table A13 *
*************

use DB_For_Vote_Regressions_Regional_US_CZ_MP.dta, clear
	
ivreg2 environmentalismMP (trade_exposure_tot = iv_trade_exposure_tot) cz##c.year, cluster(cz) first


*************
* Table A14 *
*************

use DB_For_Vote_Regressions_Regional_US_CZ.dta, clear

ivreg2 environmentalism trend_in_DEM_share (trade_exposure_tot = iv_trade_exposure_tot) i.cz, first cluster(cz)

ivreg2 environmentalism in_DEM_share_YE* (trade_exposure_tot = iv_trade_exposure_tot) cz##c.year, first cluster(cz)


*************
* Table A15 *
*************

use DB_For_Vote_Regressions_Regional_US_House.dta, clear

ivreg2 environmentalism trade_exposure_tot i.state i.year, cluster(state)

ivreg2 environmentalism (trade_exposure_tot = iv_trade_exposure_tot) i.state i.year, cluster(state) first


*************
* Table A16 *
*************

use DB_For_Vote_Regressions_Regional_US_Senate.dta, clear

ivreg2 environmentalism trade_exposure_tot i.state i.year, cluster(state)

ivreg2 environmentalism (trade_exposure_tot = iv_trade_exposure_tot) i.state i.year, cluster(state) first


